﻿using System.Collections.Generic;
using System.Dynamic;
using System.ServiceModel.Syndication;
using System.Web.Mvc;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using CodeCamp.Web.Controllers;

namespace CodeCamp.Tests.Properties.Controllers
{
	[TestClass]
	public class HomeControllerTest
	{
		[TestMethod]
		public void Index()
		{
			// Arrange
			var controller = new HomeController();

			// Act
			var result = controller.Index() as ViewResult;

			// Assert
			Assert.IsTrue(result.ViewData.Model is ExpandoObject);
			dynamic x = result.ViewData.Model as ExpandoObject;
			Assert.IsTrue(x.Value is List<SyndicationItem>);
		}
	}
}